<template>
  <div id="app">
    <fieldset>
      <legend>app组件</legend>
      <router-link to="/authContainer">按钮鉴权</router-link>
      |
      <router-link to="/modalContainer">modal封装</router-link>
      |
      <router-link to="/tabContainer">tab切换</router-link>
      |
      <router-link to="/goods">商品案例</router-link>
      <router-view></router-view>
      <modal :visible="visible" @on-cancel="cancel" @on-confirm="confirm();fetch()">
          <template v-slot:title>
            <h1>app的弹窗</h1>
          </template>
          <template v-slot:body>
            <h3>app的弹窗主体</h3>
          </template>
      </modal>
      <button @click="showModal">app的按钮点击显示模态框</button>
  </fieldset>
  </div>
    
</template>>
<script>
  import modalMix from "./mixins/modal"
  export default{
    mixins:[modalMix],
    methods:{
      fetch(){
        alert('请求到数据了')
      }
    },
    
    components:{
    }
  }
</script>